package com.kzj.mls.recyclerCard.cardView;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import com.kzj.mls.R;
import com.kzj.mls.recyclerCard.basic.CardItemView;
import com.kzj.mls.recyclerCard.card.other.NotNetCard;

/**
 * Created by xyg on 2015/10/26.
 */
public class NotNetCardView extends CardItemView<NotNetCard> {

    private Context context;
    private TextView textView_reload;

    public NotNetCardView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public NotNetCardView(Context context) {
        super(context);
        this.context = context;
    }

    public NotNetCardView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.context = context;
    }

    @Override
    public void build(final NotNetCard card) {
        super.build(card);
        textView_reload = (TextView) findViewById(R.id.textView_reload);
        textView_reload.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                card.getOnNormalButtonPressedListener().onButtonPressedListener(v,card);
            }
        });
    }
}
